/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.system.action.system;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.system.mapper.system.CompanyFrameworkMapper;
public class CompanyFramework extends BaseAction
{
    @Autowired(required=false)
	private CompanyFrameworkMapper mapper;
    /**
    */
    
    public Object t_firm() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("t_firm_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> t_firm=mapper.t_firm(params);
        t_firm = t_firm.buildTree(tb,tb.getPid());
        result.put("t_firm", t_firm);
        
        return t_firm;
    }
    /**
    转移分类
    */
    
    public Map transferClass() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("ss_firm_treecols");
        SQLList<SQLMap> ss_firm=mapper.ss_firm(params);
        ss_firm = ss_firm.buildTree(tb,tb.getPid());
        result.put("ss_firm", ss_firm);
        
        
        
        return result;
    }
    /**
    增加部门
    */
    
    public Map companyDepartAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        SQLMap s_firm_emt=s_firm.getExistfirst();
        result.put("s_firm", s_firm_emt);
        
        return result;
    }
    /**
    修改
    */
    
    public Map companyUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        SQLMap s_firm_emt=s_firm.getExistfirst();
        result.put("s_firm", s_firm_emt);
        
        return result;
    }
    /**
    */
    
    public Map u_sfirm() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_sfirm(params);
        
        return result;
    }
    /**
    */
    
    public Map u_firm_state() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_firm_state(params);
        
        return result;
    }
    /**
    */
    
    public Map d_firm() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_firm(params);
        
        return result;
    }
    /**
    转移分类修改
    */
    
    public Map transferClassSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_firm_higher = mapper.u_firm_higher(params);
        result.put("u_firm_higher", u_firm_higher);
        
        return result;
    }
    /**
    增加部门修改
    */
    
    public Map companyDepartAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID2 = mapper.CMID2(params);
        result.put("CMID2", CMID2);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map companyUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_firm = mapper.u_firm(params);
        result.put("u_firm", u_firm);
        
        return result;
    }
}